home *** CD-ROM | disk | FTP | other *** search
/ SuperHack / SuperHack CD.bin / Hack / MISC / JAVABUGS.ZIP / JAVABUGS.TXT
Encoding:
Text File  |  1996-04-21  |  5.6 KB  |  128 lines

  1.                       JAVASCRIPT PROBLEMS I'VE DISCOVERED
  2.                                        
  3.    These have all been reported back to Netscape.
  4.    
  5.    The press had a spotty record of reporting correctly on this. I've
  6.    prepared a small report on the stories I've seen. I'm amazed at how
  7.    inaccurate some of the stories are! You'd think that they would have
  8.    at least read some of what I've written!
  9.    
  10.      If you see an article in the press mentioning these pages, please
  11.      let me know.
  12.      
  13.    
  14.      _________________________________________________________________
  15.    
  16.      * (4/1) I will be making the 3/18 and 3/21 exploits available
  17.        shortly, since they are fixed in 3.0b2. -->
  18.        
  19.      * (3/29) Netscape has gotten some fixes into 3.0b2. Of my three
  20.        exploits that I reported against 2.01, only the new history
  21.        tracker continues to work (I.e., the others were fixed in response
  22.        to my report).
  23.        
  24.      * (3/22) Here is a note to the www-security list I wrote describing
  25.        the latest problems I know affecting 2.01.
  26.        
  27.      * (3/21) I have a means (using 2.0 or 2.01) to read and retrieve
  28.        files off a user's disk. It requires a minimal forms interaction
  29.        by the user (MEANING: the user has to click on something to invoke
  30.        the file read). I am not making this exploit available at this
  31.        time.
  32.        
  33.      * (3/18) I have modified the "directory browser" exploit such that
  34.        it works with 2.01. I am not making this exploit available at
  35.        this time.
  36.        
  37.      * (3/18) Building on the item I discovered on 3/15, I found that if
  38.        I click on Cancel in the Save dialog, it invokes the "stuck
  39.        onload" bug I reported on 2/21 in a determinist fashion. Trying to
  40.        create such a repeatable incarnation of this bug is what lead me
  41.        to my "tracker" in the first place.
  42.        
  43.        Anyway, utilizing a Save File dialog as the initiator, this lets
  44.        me build a history tracker that works with 2.01. I've created a
  45.        sample exploit. This writes the the same log as my 2/22 tracker,
  46.        so use this to view the tail of the logfile.
  47.        
  48.        Note that with 2.01, the 1x1 window previously used ends up being
  49.        bigger, so you can easily see it flash. And, the "stuck onload"
  50.        gets "unstuck" by visiting another page with an onLoad() tag. This
  51.        may not be a very intriguing way to spy on someone.
  52.        
  53.      * (3/15) NOTE: This item in and of itself is not necessarily a
  54.        security problem.
  55.        
  56.        JavaScript loaded from some page can write to local files on your
  57.        disk. This info is from my news posting to the devs-javascript
  58.        group. This is the basic bit of code:
  59.  
  60.         document.open("Can I write to your disk?")
  61.         document.write("<censored>")
  62.         document.close()
  63.    
  64.        
  65.        This trick requires the user to go through a File Save dialog, and
  66.        hence, is not transparent. The user chooses the file name, but I'm
  67.        able to write to disk none-the-less. This is quite against the
  68.        stated fact that JavaScript is "Secure. Cannot write to hard disk"
  69.        - and this works in 2.01.
  70.        
  71.        Try my example.
  72.        
  73.        For me, this always caused a GPF on Windows NT. That is, once the
  74.        File Save dialog appeared, no matter what I selected, it went
  75.        poof! It seems to core dump the UNIX version of Navigator if you
  76.        don't open up a new window relatively fast (i.e., before you go to
  77.        some other JavaScript laden page). I've found that nasty things
  78.        begin to happen if you click on Cancel in the Save dialog (see
  79.        3/18 for details).
  80.        
  81.        Note that the file never gets closed until you exit Netscape, so
  82.        small writes tend to get buffered up and not output.
  83.        
  84.        These above mentioned bugs with this mechanism initially lead me
  85.        to believe that the ability to write files was errantly added to
  86.        JavaScript. Brendan Eich has since informed me that this ability
  87.        is intentional, or at least, known about.
  88.        
  89.      * (2/22) I discovered a way to make my JavaScript stay resident in a
  90.        new window, so that I can track your history in real time.
  91.        
  92.        This problem has been fixed in Netscape-2.01; see Netscape's
  93.        security note on Java and JavaScript.
  94.        
  95.        You can read the original article I posted to the RISKS Forum on
  96.        this problem. That whole issue is also available in the archive in
  97.        the UK. Another article of interest appeared Keith Dawson's TBTF
  98.        on Feb 28.
  99.        
  100.      * (2/21) I've seen JavaScript stay resident after you leave a page.
  101.        This is what I call the "stuck onload()" problem, and is a BUG
  102.        (still in 2.01).
  103.        
  104.      * (2/13) The bug in Netscape 2.0b3 that allowed JavaScript to
  105.        directory browse lives on in the 2.0 release, even after
  106.        Netscape told us it was fixed.
  107.        
  108.        This is fixed in Netscape-2.01.
  109.        
  110.      * This is a classified as a red herring, but JavaScript has the
  111.        ability to toss up arbitrary alert boxes. I used to have this one
  112.        pop up on my home page. I wanted this message to sound really bad.
  113.        This was before I wrote the tracker. A more interesting message
  114.        would be Please type your password or something similar.
  115.        
  116.      * There are hundreds of exciting things to do with Netscape 2.0 and
  117.        JavaScript.
  118.        WARNING: viewing this page may damage or crash Netscape.
  119.        
  120.    
  121.      _________________________________________________________________
  122.    
  123.     John Robert LoVerso, OSF Research Institute
  124.     
  125.     Last modified on Monday, 01-Apr-96 14:51:07 EST.
  126.     This page accessed 16247 times.
  127.  
  128.